using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace english_sentences.Controllers
{
    /// <summary>
    /// The class is used to do some common operations
    /// and inherited by other controller.
    /// </summary>
    /// <typeparam name="TController">The generic controller class for logger.</typeparam>
    [Route("api/[controller]")]
    [ApiController]
    public class BaseApiController<TController> : ControllerBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseApiController{TController}"/> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        public BaseApiController(ILogger<TController> logger)
        {
            this._logger = logger;
        }

        /// <summary>
        /// Gets get the logger property.
        /// </summary>
        /// <value>
        /// The logger property.
        /// </value>
        protected ILogger<TController> _logger { get; }
    }
}